package com.ruoyi.production.service.impl.graftingclip;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.production.domain.graftingclip.GraftingclipPurchaseApply;
import com.ruoyi.production.mapper.graftingclip.GraftingclipPurchaseApplyMapper;
import com.ruoyi.production.service.graftingclip.IGraftingclipPurchaseApplyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 嫁接夹购买申请Service业务层处理
 *
 * @author ruoyi
 * @date 2021-07-11
 */
@Service
public class GraftingclipPurchaseApplyServiceImpl implements IGraftingclipPurchaseApplyService
{
    @Autowired
    private GraftingclipPurchaseApplyMapper graftingclipPurchaseApplyMapper;

    /**
     * 查询嫁接夹购买申请
     *
     * @param graftingclipPurchaseApplyId 嫁接夹购买申请ID
     * @return 嫁接夹购买申请
     */
    @Override
    public GraftingclipPurchaseApply selectGraftingclipPurchaseApplyById(Long graftingclipPurchaseApplyId)
    {
        return graftingclipPurchaseApplyMapper.selectGraftingclipPurchaseApplyById(graftingclipPurchaseApplyId);
    }

    /**
     * 查询嫁接夹购买申请列表
     *
     * @param graftingclipPurchaseApply 嫁接夹购买申请
     * @return 嫁接夹购买申请
     */
    @Override
    public List<GraftingclipPurchaseApply> selectGraftingclipPurchaseApplyList(GraftingclipPurchaseApply graftingclipPurchaseApply)
    {
        return graftingclipPurchaseApplyMapper.selectGraftingclipPurchaseApplyList(graftingclipPurchaseApply);
    }

    /**
     * 新增嫁接夹购买申请
     *
     * @param graftingclipPurchaseApply 嫁接夹购买申请
     * @return 结果
     */
    @Override
    public int insertGraftingclipPurchaseApply(GraftingclipPurchaseApply graftingclipPurchaseApply)
    {
        graftingclipPurchaseApply.setCreateTime(DateUtils.getNowDate());
        return graftingclipPurchaseApplyMapper.insertGraftingclipPurchaseApply(graftingclipPurchaseApply);
    }

    /**
     * 修改嫁接夹购买申请
     *
     * @param graftingclipPurchaseApply 嫁接夹购买申请
     * @return 结果
     */
    @Override
    public int updateGraftingclipPurchaseApply(GraftingclipPurchaseApply graftingclipPurchaseApply)
    {
        graftingclipPurchaseApply.setUpdateTime(DateUtils.getNowDate());
        return graftingclipPurchaseApplyMapper.updateGraftingclipPurchaseApply(graftingclipPurchaseApply);
    }

    /**
     * 批量删除嫁接夹购买申请
     *
     * @param graftingclipPurchaseApplyIds 需要删除的嫁接夹购买申请ID
     * @return 结果
     */
    @Override
    public int deleteGraftingclipPurchaseApplyByIds(Long[] graftingclipPurchaseApplyIds)
    {
        return graftingclipPurchaseApplyMapper.deleteGraftingclipPurchaseApplyByIds(graftingclipPurchaseApplyIds);
    }

    /**
     * 删除嫁接夹购买申请信息
     *
     * @param graftingclipPurchaseApplyId 嫁接夹购买申请ID
     * @return 结果
     */
    @Override
    public int deleteGraftingclipPurchaseApplyById(Long graftingclipPurchaseApplyId)
    {
        return graftingclipPurchaseApplyMapper.deleteGraftingclipPurchaseApplyById(graftingclipPurchaseApplyId);
    }
}
